#ifndef M0WIG_H
#define M0WIG_H

#include <QWidget>
#include<QDebug>
#include <QUdpSocket>
#include <QTcpSocket>
#include <QHostAddress>
#include <QTextStream>

#include<QDataStream>
#include <QApplication>

#include <QPainter>
#include <QPixmap>
namespace Ui {
class M0Wig;
}

class M0Wig : public QWidget
{
    Q_OBJECT

public:
    explicit M0Wig(QWidget *parent = 0);
    ~M0Wig();
    //创建一个udp的socket
         QUdpSocket * udpsocket=NULL;
         QTcpSocket * tcpsocket = NULL;
//         QUdpSocket * receiver=NULL;
         //利用案例修改代码
         void initSocket();//初始化套接字
         QHostAddress tcpsocketip;
          quint16 tcpsocketPort;
           QByteArray datagram;



public slots:
    int equip_select();
     void readPendingDatagrams();//读取信息槽函数
       void btnConnClickedSlot();//



private:
    Ui::M0Wig *ui;
};

#endif // M0WIG_H
